#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    double e;
    scanf("%lf", &e);
    double i = 1;
    double sum = 1;
    double term = 1;
    while (1)
    {
        term *= i / (2 * i + 1);
        if(term < e)
        break;
        sum += term;
        i++;
    }
    printf("%.7f", sum * 2);
    return 0;
}